<include file="Public:header" />
<div class="container">
	<!-- Docs nav ================================================== -->
	<div class="page-header">
		<select name="select1" id="select1" onchange="changeContent()">
			<optgroup label="{:L('PREDEFINED_VIEWS')}" class="st" style="border:none">
				<option value="">{:L('ALL_LOG')}</option>
				<option <if condition="$Think.get.by eq 'me'">selected="selected"</if> value="?by=me">{:L('MY_LOG')}</option>
				<option <if condition="$Think.get.by eq 'today'">selected="selected"</if> value="?by=today">{:L('TODAY_LOG')}</option>
				<option <if condition="$Think.get.by eq 'week'">selected="selected"</if> value="?by=week">{:L('THIS_WEEK_LOG')}</option>
				<option <if condition="$Think.get.by eq 'month'">selected="selected"</if> value="?by=month">{:L('THIS_MONTH_LOG')}</option>
			</optgroup>
			<optgroup label="{:L('RECENTLY_VIEW')}" class="st" style="border:none">
				<option <if condition="$Think.get.by eq 'add'">selected="selected"</if> value="?by=add">{:L('CREATE_RECENTLY')}</option>
				<option <if condition="$Think.get.by eq 'update'">selected="selected"</if> value="?by=update">{:L('UPDATE_RECENTLY')}</option>
			</optgroup>
			<optgroup label="{:L('VIEW_BY_MODULE')}" class="st" style="border:none">
				<option value="?module=Leads">{:L('LEADS')}</option>
				<option value="?module=Customer">{:L('CUSTOMER')}</option>
				<option value="?module=Contacts">{:L('CONTACTS')}</option>
				<option value="?module=Business">{:L('BUSINESS')}</option>
				<option value="?module=Tasks">{:L('TASK')}</option>
				<option value="?module=Event">{:L('EVENT')}</option>
				<option value="?module=Financial">{:L('FINANCE')}</option>
				<option value="?module=Product">{:L('PRODUCT')}</option>
			</optgroup>
		</select>
	</div>
	<include file="Public:alert" />
	<div class="row"> 
		<form action="{:U('user/mydaily_delete')}" method="post">
			<div class="span12">
				<button id="delete" type="submit" class="btn">{:L('DELETE')}</button>
				<div class="pull-right">
					<a href="{:U('daily/mydaily_add')}" class="btn btn-primary">{:L('ADD_LOG')}</a>
				</div>
			</div>
			<div class="span12">
				<if condition="$list eq null"><tr><td>{:L('NO_LOG_DATA_IN_VIEW')}</td></tr>
				<else/>
					<table class="table table-hover table-striped table_thead_fixed">
						<thead>
							<tr>
								<th><input id="control_all" class="control_all" type="checkbox" /></th>
								<th>{:L('SUBJECT')}</th>
								<th>{:L('CONTENT')}</th>
								<th>{:L('CREATE_TIME')}</th>
								<th>{:L('CORRESPOND_SECTION')}</th>
								<th>&nbsp;</th>
							</tr>
						</thead>
						<tbody>
							<volist name="list" id="vo">
							<tr>
								<td><input class="check_list" type="checkbox" name="dialy_list[]" value="{$vo.daily_id}"/></td>
								<td>{$vo.subject}</td>
								<td>{$vo.content|}</td>
								<td>{$vo.create_date|date="Y-m-d H:i:s",###}</td>
								<td>&nbsp;</td>
								<td>
									<a href="{:U('user/mylog_view','id='.$vo['daily_id'])}">{:L('VIEW')}</a>
									<a href="{:U('user/mylog_edit','id='.$vo['daily_id'])}">{:L('EDIT')}</a>
								</td>
							</tr>
							</volist>
						</tbody>
					</table>	
				</if>
			</div>
		</form>
		<div class="span12">
			{$page}
		</div>
	</div>
</div>
<script type="text/javascript">
function changeContent(){
		a = $("#select1  option:selected").val();
		window.location.href="{:U('daily/index')}"+a;
	} 
$(function(){
	$("#control_all").click(function(){
		$("input[class='check_list']").prop('checked', $(this).prop("checked"));
	});
})
</script>
<include file="Public:footer" />
